package cn.com.cetccst.network;

import androidx.annotation.NonNull;

import cn.com.cetccst.network.log.HttpLoggingInterceptor;
import cn.com.cetccst.network.log.IHttpLog;
import okhttp3.OkHttpClient;
import retrofit2.Retrofit;

public class RetrofitClient implements IRetrofitClient {

    private Retrofit retrofit;
    private HttpLoggingInterceptor httpLog;
    private OkHttpClient okHttpClient;

    public RetrofitClient(@NonNull Retrofit retrofit, OkHttpClient okHttpClient, @NonNull HttpLoggingInterceptor httpLog) {
        this.retrofit = retrofit;
        this.okHttpClient = okHttpClient;
        this.httpLog = httpLog;
    }

    @Override
    public Retrofit getRetrofit() {
        return retrofit;
    }

    @Override
    public IHttpLog getHttpLogConfig() {
        return httpLog;
    }

    @Override
    public OkHttpClient getOKHttpClient() {
        return okHttpClient;
    }


}
